package wqh.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wqh.dao.UserDao;
import wqh.domain.User;
import wqh.service.UserService;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public List<User> findAllRecord() {
        return userDao.findAllRecord();
    }

    public User findAllById(Integer id) {
        return userDao.findAllById(id);
    }

    public List<User> findAllByObject(User user) {
        return userDao.findAllByObject(user);
    }

    public int insertRecord(User user) {
        return userDao.insertRecord(user);
    }

    public int updateDataById(User user) {
        return userDao.updateDataById(user);
    }

    public int deleteById(Integer id) {
        return userDao.deleteById(id);
    }
}
